package com.gouda.core.service.advertisement;

import com.gouda.core.dto.advertisement.AdvertisementDto;
import com.gouda.core.enums.GeneralStateEnum;
import com.gouda.core.enums.PlatformEnum;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created by souu on 15/12/5.
 */
public interface AdvertisementService {

    /**
     * 创建广告
     *
     * @param title
     * @param introduction
     * @param defaultEnum
     * @param startTime
     * @param endTime
     * @param cityIds
     * @param picIds
     * @param platforms
     * @param skipUrls
     */
    int createAdvertisement(String title, String introduction,
                            GeneralStateEnum defaultEnum, Date startTime, Date endTime, Set<Long> cityIds,
                            List<Long> picIds, List<Integer> platforms, List<String> skipUrls);

    /**
     * 删除广告
     *
     * @param id
     */
    void delAdvertisement(long id);

    /**
     * 广告上线
     *
     * @param id
     */
    void updateAdvertisementOnline(long id);


    /**
     * 广告下线
     *
     * @param id
     */
    void updateAdvertisementOffline(long id);

    /**
     * 查询
     *
     * @param cityId
     * @return
     */
    List<AdvertisementDto> getAdvertisementByCityIdAndPlatform(long cityId, PlatformEnum platform);
}
